package com.test.java;

import java.util.Scanner;

/**
 * 给定一个k位整数N = dk-1*10k-1 + ... + d1*101 + d0 (0<=di<=9, i=0,...,k-1, dk-1>0)，
 * 请编写程序统计每种不同的个位数字出现的次数。例如：给定N = 100311，则有2个0，3个1，和1个3。
 * =============================================================
 * Version          Author          Date            Description
 * 1.0              白建         2017/12/21             创建
 * =============================================================
 */
public class Java_12
{

    public static void main(String[] args)
    {

        short[] count = new short[10];
        Scanner scanner = new Scanner(System.in);
        String temp = scanner.nextLine();

        for (int i = 0; i < temp.length(); i++)
        {
            switch (temp.charAt(i))
            {
            case '0':
                count[0]++;
                break;
            case '1':
                count[1]++;
                break;
            case '2':
                count[2]++;
                break;
            case '3':
                count[3]++;
                break;
            case '4':
                count[4]++;
                break;
            case '5':
                count[5]++;
                break;
            case '6':
                count[6]++;
                break;
            case '7':
                count[7]++;
                break;
            case '8':
                count[8]++;
                break;
            case '9':
                count[9]++;
                break;
            default:
                break;
            }
        }

        for (int i = 0; i < 10; i++)
        {
            if (count[i] != 0)
            {
                System.out.println(i + ":" + count[i]);
            }
        }
    }
}
